
<div class="modal" ng-controller="SaveModelCtrl">
    <div class="modal-dialog">
        <div class="modal-content">
        <div class="modal-header">
            <h2>{{'MODEL.SAVE.TITLE' | translate}}</h2>
        </div>
        <div class="modal-body">
        
        	<div class="form-group">
           		<label for="nameField">{{'MODEL.NAME' | translate}}</label>
        		<input type="text"
                       ng-disabled="status.loading"
                       id="nameField"
                       class="form-control"
                       ng-model="bpmDefSetting.bpmDefinition.name"
                       ui-keypress="{13:'save()'}"
                       auto-focus />
        	</div>
        	<div class="form-group">
           		<label for="docTextArea">{{'MODEL.DESCRIPTION' | translate}}</label>
           		<textarea id="docTextArea" ng-disabled="status.loading" class="form-control" ng-model="bpmDefSetting.bpmDefinition.desc"></textarea>
        	</div> 
        </div>
        <div class="modal-footer">
        
        	<div class="pull-right">
            	<button type="button" class="btn" ng-click="close()" ng-disabled="status.loading" translate>ACTION.CANCEL</button>
            	<button class="btn btn-primary" ng-click="save()" ng-disabled="status.loading"  ng-show="!error" translate>ACTION.SAVE</button>
            	<button class="btn btn-primary" ng-click="save(true)" ng-disabled="status.loading" ab-tip title="请注意 ！<br>流程实例会使用启动时版本的流程配置<br>新发起的流程则使用当前主版本的流程配置。<br>保存则会立即更新当前版本的流程配置" ng-show="!error" >发布新版本</button>
            </div>
        
            <div class="pull-right popup-error" ng-if="error && !error.isConflict">
                <span>{{error.msg}}</span>
            </div>
        
        	<loading></loading>
        
        </div>
    </div>
</div>